Skip to content

Show a notice when a field value was rejected - #21

Merged
masnwilliams merged 3 commits into
mainfrom
hypeship/replace-existing-field-notice
Aug 22, 2026
Merged

Show a notice when a field value was rejected#21
masnwilliams merged 3 commits into
mainfrom
hypeship/replace-existing-field-notice

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

summary

  • require canonical managed-auth fields to declare reason: "missing" | "rejected"
  • carry the reason through the canonical-to-rendered field projection
  • show a localized rejection notice only when reason === "rejected"
  • retain legacy-only placeholder and hint text while canonical and legacy projections coexist
  • expose fieldRejectedNotice and inputRejectedNotice customization points
  • validate the vendored canonical field, choice, event, and submit types against @onkernel/sdk@0.93.0
  • install the latest Kernel SDK in the backend quick start

This removes the temporary public replace_existing shape entirely.

stack

testing

  • bun run test
  • bun run typecheck
  • bun run build
  • bun run format:check
  • cd packages/managed-auth-react && npm pack --dry-run
  • linked the top-of-stack package into managed-auth-hosted-ui
  • hosted UI: bun run test, bun run typecheck, bun run lint, bun run build, bun run format:check

Note

Medium Risk
Touches auth form UX, field protocol types, and canonical-to-UI projection. Risk is moderate: user-facing credential flow, but no auth/security logic or credential handling changes.

Overview
Shows a localized, customizable notice when a canonical field has reason: "rejected", so users know a saved value was not accepted and need to enter a new one.

Canonical ManagedAuthField now requires reason: "missing" | "rejected". That reason is projected onto rendered fields. The form only shows the notice for "rejected", wires it into aria-describedby with role="status", and keeps any existing hint. Appearance/localization hooks are inputRejectedNotice and fieldRejectedNotice.

Canonical-to-UI mapping also preserves legacy placeholder/hint while both shapes coexist. Vendored protocol types are compile-checked against @onkernel/sdk@0.93.0.

Reviewed by Cursor Bugbot for commit a5c2f00. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
managed-auth-react-demo Ready Ready Preview Aug 21, 2026 11:07pm

@masnwilliams
masnwilliams marked this pull request as ready for review August 2, 2026 18:41
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from 7ab0711 to 0a99efa Compare August 5, 2026 23:12
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from 0a99efa to bc63cd6 Compare August 5, 2026 23:31
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from bc63cd6 to 32fd50b Compare August 5, 2026 23:44
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from 32fd50b to 334f881 Compare August 14, 2026 17:03
@masnwilliams masnwilliams changed the title Show a notice when a saved field value was rejected Show a notice when a field value was rejected Aug 14, 2026
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from 334f881 to 88003e5 Compare August 20, 2026 20:06
@masnwilliams
masnwilliams requested a review from akxue August 20, 2026 20:11
Base automatically changed from hypeship/canonical-awaiting-input to main August 20, 2026 20:12
@masnwilliams
masnwilliams force-pushed the hypeship/replace-existing-field-notice branch from 88003e5 to 1ceef72 Compare August 20, 2026 20:12

@akxue akxue left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed — no blockers found. approving.

questions

  • packages/managed-auth-react/src/lib/types.ts:77ManagedAuthField is publicly exported and now requires reason. can you confirm which downstream consumers construct this type and whether the release notes or versioning should call out the migration? this is non-blocking; mason likely has the right context.

tests

  • packages/managed-auth-react/src/components/UnifiedAuthForm.tsx:303-306 — consider adding a component test covering rejection-notice rendering, localization, and the appearance slot.

accessibility

  • packages/managed-auth-react/src/components/UnifiedAuthForm.tsx:303-306 — consider associating the notice with the input via aria-describedby and using polite live-region behavior so screen readers announce asynchronous rejection updates.

validation: bun test (20 passed), package build, typecheck, and format check all pass.

@masnwilliams
masnwilliams merged commit 4ec2a4d into main Aug 22, 2026
4 checks passed
@masnwilliams
masnwilliams deleted the hypeship/replace-existing-field-notice branch August 22, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants